package com.chunxiadong.service.impl;

import com.chunxiadong.mapper.BlogInfoMapper;
import com.chunxiadong.pojo.BlogInfo;
import com.chunxiadong.service.BlogInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @auther QiuShangcheng
 * @create 2021/6/6
 */
@Service
public class BlogInfoServiceImpl implements BlogInfoService {

    @Autowired
    BlogInfoMapper blogInfoMapper;

    @Transactional
    @Override
    public BlogInfo getBlogInfo() {
        BlogInfo blogInfo = new BlogInfo(blogInfoMapper.getTotalArticle(), 100, blogInfoMapper.getTotalComment(), 0);
        return blogInfo;
    }
}
